package com.ruoyi.order.domain;

import com.ruoyi.common.core.domain.OrderEntity;
import com.ruoyi.market.domain.ConfigBase;
import com.ruoyi.market.domain.Wallet;
import com.ruoyi.customer.domain.CustomerUser;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;

/**
 * 充值订单 tb_order_wallet
 *
 * @author ruoyi
 */
public class OrderWallet extends OrderEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单编号 */
    private String orderNo;

    /** 充值配置ID */
    private Long walletId;

    /** 店铺ID */
    private String shopId;

    /** 支付状态 （paid-已支付 unpaid-未支付 cancel-已取消 默认unpaid） */
    private String payStatus;

    /** 支付类型 微信小程序-wxmp 微信公众号h5-wxofficailaccount 苹果app-iosapp 支付宝-alipay 余额-balance  */
    private String payType;

    /** 初始金额 */
    private BigDecimal initAmount;

    /** 优惠金额 */
    private BigDecimal discountAmount;

    /** 实付金额 */
    private BigDecimal actualAmount;

    /** 支付参数 不写入库表 */
    private Object payParams;

    private CustomerUser customerUser;

    private Wallet wallet;

    /** 所属店铺信息   */
    private ConfigBase shopInfo;

    public OrderWallet()
    {

    }

    public OrderWallet(String orderNo)
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo(){ return orderNo; }

    public void setOrderNo(String orderNo){ this.orderNo = orderNo; }

    public String getShopId(){ return shopId; }

    public void setShopId(String shopId){ this.shopId = shopId; }

    public BigDecimal getInitAmount(){ return initAmount;}

    public void setInitAmount(BigDecimal initAmount){ this.initAmount = initAmount; }

    public BigDecimal getActualAmount(){ return actualAmount;}

    public void setActualAmount(BigDecimal actualAmount){ this.actualAmount = actualAmount; }

    public BigDecimal getDiscountAmount(){ return discountAmount;}

    public void setDiscountAmount(BigDecimal discountAmount){ this.discountAmount = discountAmount; }

    public Long getWalletId()
    {
        return walletId;
    }

    public void setWalletId(Long walletId)
    {
        this.walletId = walletId;
    }

    public String getPayStatus()
    {
        return payStatus;
    }

    public void setPayStatus(String payStatus)
    {
        this.payStatus = payStatus;
    }

    public String getPayType()
    {
        return payType;
    }

    public void setPayType(String payType)
    {
        this.payType = payType;
    }

    public Object getPayParams()
    {
        return payParams;
    }

    public void setPayParams(Object payParams)
    {
        this.payParams = payParams;
    }

    public CustomerUser getCustomerUser() { return customerUser; }

    public void setCustomerUser(CustomerUser customerUser)
    {
        this.customerUser = customerUser;
    }

    public Wallet getWallet() { return wallet; }

    public void setWallet(Wallet wallet)
    {
        this.wallet = wallet;
    }

    public ConfigBase getShopInfo()
    {
        return shopInfo;
    }

    public void setShopInfo(ConfigBase shopInfo)
    {
        this.shopInfo = shopInfo;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("orderNo", getOrderNo())
            .append("orderUserId", getOrderUserId())
            .append("payUserId", getPayUserId())
            .append("walletId", getWalletId())
            .append("shopId", getShopId())
            .append("payStatus", getPayStatus())
            .append("initAmount", getInitAmount())
            .append("actualAmount", getActualAmount())
            .append("discountAmount", getDiscountAmount())
            .append("appId", getAppId())
            .append("appType", getAppType())
            .append("payType", getPayType())
            .append("openId", getOpenId())
            .append("platform", getPlatForm())
            .append("payParams", getPayParams())
            .append("customerUser", getCustomerUser())
            .append("wallet", getWallet())
            .append("shopInfo", getShopInfo())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
